const mongoose = require('mongoose')

const Comment = mongoose.model('Comment')

const comments = async() =>
    await Comment.find({}).sort({timestamp:-1}).limit(6)
    .then(comments => comments)
    .catch(err => ctx.throw(500, err))


module.exports = comments
